/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.woupla.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

/**
 *
 * @author dimi
 */
@Embeddable
public class PlaningPK implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = -754476672135984358L;
	@Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private int employee;
    @Basic(optional = false)
    @Column(name = "semaine")
    private int semaine;

    public PlaningPK() {
    }

    public PlaningPK(int id, int semaine) {
        this.employee = id;
        this.semaine = semaine;
    }

    public int getId() {
        return employee;
    }

    public void setId(int id) {
        this.employee = id;
    }

    public int getSemaine() {
        return semaine;
    }

    public void setSemaine(int semaine) {
        this.semaine = semaine;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) employee;
        hash += (int) semaine;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PlaningPK)) {
            return false;
        }
        PlaningPK other = (PlaningPK) object;
        if (this.employee != other.employee) {
            return false;
        }
        if (this.semaine != other.semaine) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.PlaningPK[ employeeId=" + employee + ", semaine=" + semaine + " ]";
    }
    
}
